﻿<?php
if(!defined('IN_PHPSCUP'))exit('hacking'); 

class HuiyingApp extends BaseApp
{
    function index()
    {
        $module_list_data = & $GLOBALS['SCup']->_get_module_list_data();
        $appidname = array();
        foreach($module_list_data as $key => $value) {
		    $appidname[$value['id']] = $key ;
		}
		unset($module_list_data);
		$TB_links = &$this->_model('huiying');		
		$data = $TB_links->show();
        $this->assign('lw_data', $data['data']);		
		$this->assign('lw_page', $data['page']);
		
        $this->assign('appidname', $appidname);
	    
        $this->assign('view_charset', VIEW_CHARSET);	
        $this->assign('page_title', $GLOBALS['Lang']->_get_lang_var(SITE_TITLE));
        $this->assign('page_description', $GLOBALS['Lang']->_get_lang_var(SITE_DESCRIPTION));
        $this->assign('page_keywords', $GLOBALS['Lang']->_get_lang_var(SITE_KEYWORDS));	
		
        $this->assign('site_url',SITE_URL);
		
        $this->assign('web_view_dir',SITE_URL.'/admin/view/default/');
		
        $this->display('huiying_list.view.php');
    }




    function editpost()
    {

	     $data = $_POST['data'];
		 
		 $id = intval($data['id']);	 
		 $TB_links = &$this->_model('huiying');  		 		 		
		 $picdata = $TB_links->oneshow($id);
		 
		 $TB_links->editaction($id,$data);

		 
		 $this->index();

    }


    function del()
    {

	     $id = $_GET['id'];
		 $TB_links = &$this->_model('huiying');  
		 		
		 $TB_links->del($id);		 
		 $this->index();	  

    }



	
}


?>